<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<table id="sort-table">
		<thead>
			<tr>
				<th>
					<input type="checkbox" value="check_none"
						onclick="this.value=check(this.form.list)" class="submit" />
				</th>
				<th>
					#
				</th>
				<th>
					User name
				</th>
				<th>
					Password
				</th>
				<th style="width: 132px">
					Options
				</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${categories.resultSet}" var="category">
				<tr>
					<td class="center">
						<input type="checkbox" value="1" name="list" class="checkbox" />
					</td>
					<td>${category.id}</td>
					<td>${category.name}</td>
					<td>${category.description}</td>
					<td></td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
		<c:forEach items="${categories.pages}" var="page">
			<c:choose>
				<c:when test="${categories.pager.page == page}">
					<li class="active">${page}</li>
				</c:when>
				<c:otherwise>
					<li><a href="?page=${page}&pageSize=${categories.pager.pageSize}">${page}</a></li>
				</c:otherwise>
			</c:choose>			
		</c:forEach>
</body>
</html>